Skip to content

feat(localai): support multiple concurrent connections - #6178

Open
Max-Reisinger wants to merge 1 commit into
Mintplex-Labs:masterfrom
Max-Reisinger:feat/localai-multiple-connections
Open

feat(localai): support multiple concurrent connections#6178
Max-Reisinger wants to merge 1 commit into
Mintplex-Labs:masterfrom
Max-Reisinger:feat/localai-multiple-connections

Conversation

@Max-Reisinger

@Max-Reisinger Max-Reisinger commented Aug 25, 2026

Copy link
Copy Markdown
Contributor

Pull Request Type

  • ✨ feat (New feature)
  • 🐛 fix (Bug fix)
  • ♻️ refactor (Code refactoring without changing behavior)
  • 💄 style (UI style changes)
  • 🔨 chore (Build, CI, maintenance)
  • 📝 docs (Documentation updates)

Relevant Issues

resolves #6162

Description

  • add admin-managed, named LocalAI connections with an endpoint, optional encrypted API key, default model, and context window
  • allow workspaces and the chat model selector to bind to a saved LocalAI connection while retaining the existing system LocalAI settings as the default
  • allow model-router fallbacks and individual routing rules to target different LocalAI connections concurrently
  • propagate the selected connection through chat, agent, and router provider resolution without mutating global environment settings
  • prevent deletion while a connection is referenced and add regression coverage for validation, secret handling, and per-instance LocalAI isolation

Screenshots

Multiple named LocalAI connections can be saved independently, each with its own base URL, model, API key, and context window.

A model router can target a specific saved LocalAI connection. In this example, prompts containing code are routed to LocalAI GPU 2 using qwen2.5-14b-instruct.

exec-3e9d6e3a-82e6-46c7-bcae-7b343f765cde exec-cfef17ae-d074-48a1-82f2-6f56f28672b6

Additional Information

  • Existing LOCAL_AI_* settings remain fully supported as the fallback when no saved connection is selected.
  • Prisma schema validation, migration SQL execution against a temporary SQLite database, frontend lint, and the frontend production build pass locally.
  • The feature-focused test suites pass (4 suites, 70 tests). The root test run reaches 504 passing tests, but the collector FFmpeg suite cannot run in this environment because it uses Node 24 and has no FFmpeg binary; the contribution guide requires Node 18.18.
  • Root lint is currently blocked by five pre-existing Prettier errors in three untouched server files. Targeted lint for every changed server file and full frontend lint pass.

Developer Validations

  • I ran yarn lint from the root of the repo & committed changes
  • Relevant documentation has been updated (if applicable)
  • I have tested my code functionality
  • Docker build succeeds locally

@Max-Reisinger
Max-Reisinger marked this pull request as ready for review August 25, 2026 17:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[FEAT]: Allow multiple Local AIs

1 participant